
<table class="table table-bordered">
    <tbody>
    <tr>
        <th colspan="6" style="color: #007bff;">{{ ts('VALIDWARRANTYID') }}</th>
    </tr>
    <tr>
        <td class="tth">{{ ts('WARRANTYID') }}</td>
        <td class="ttd">{{ @$v->warranty_id }}</td>
        <td class="tth">{{ ts('LICENSEPLATE') }}</td>
        <td class="ttd">{{ @$v->license_plate }}</td>
        <td class="tth">{{ ts('CUSTOMERNAME') }}</td>
        <td class="ttd">{{ @$v->first_name }}</td>
    </tr>
    <tr>
        <td class="tth">{{ ts('YEAR') }}</td>
        <td class="ttd">{{ @$v->year_id }}</td>
        <td class="tth">{{ ts('MAKE') }}</td>
        <td class="ttd">{{ ts('make_master.'.@$v->make_id) }}</td>
        <td class="tth">{{ ts('MODEL') }}</td>
        <td class="ttd">
            {{ ts('model_master.'.@$v->model_id) ?: $v->model_id }}
        </td>
    </tr>
    @php
        $mRoll = gMR($v->id);
        $wPart = gWFP($v->id);
    @endphp
    @if(@$mRoll)
        <tr>
            <td class="tth">{{ ts('rollnumber') }}</td>
            <td class="ttd">{{ @$mRoll }}</td>
        </tr>
    @endif
    @empty($wPart)
    @else
        <tr>
            <td class="tth">{{ ts('azbw') }}</td>
            <td colspan="5" class="ttd ttt">
                <table class="table table-bordered text-center">
                    <tbody>
                    <tr>
                        <td class="tth">
                            {{ ts('ZTBW') }}
                        </td>
                        <th class="tth">
                            {{ ts('filmtype') }}
                        </th>
                    </tr>
                    @foreach($wPart as $c)
                        <tr>
                            <td>{{ @$c->part }}</td>
                            <td>{{ @$c->film_type }}</td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            </td>
        </tr>
    @endif
    <tr>
        <td class="tth">{{ ts('INSTALLATIONDATE') }}</td>
        <td class="ttd">{{ fdate(@$v->installation_date) }}</td>
        <td class="tth">{{ ts('DMMC') }}</td>
        <td class="ttd">{{ getWDName($v) }}</td>
        <td class="tth">{{ ts('CITY') }}</td>
        <td class="ttd">{{ ts('cities.'.@$v->city) }}</td>
    </tr>
    <tr>
        <td colspan="6">
            <button class="btn btn-primary" onclick="getDetails('{{ @$v->warranty_id }}', '{{ substr(@$v->phone_number, -4) }}')">查看详情</button>
        </td>
    </tr>
    </tbody>
</table>